package com.linwen.javase.desgin_pattern.structure.composite;

/**
 * @ClassName Leaf
 * @Description
 * @Author lin
 * @Date 2022/6/21 下午11:03
 * @Version V1.0
 */
public class Leaf implements Component {
    private String name;

    public Leaf(String name){
        this.name = name;
    }

    @Override
    public void operate() {
        System.out.println("我是树叶:  "+name);
    }
}
